#ifndef __I2C_CTRL_H__
#define __I2C_CTRL_H__

#define BYTE unsigned char
#define I2C_FILE_NAME "/dev/i2c-1"

int ql_get_i2c_register(unsigned short slave_addr, unsigned char reg, unsigned char *outbuf, int buf_len );
int ql_set_i2c_register(unsigned short slave_addr, unsigned char reg, unsigned char *inbuf, int buf_len );
int i2c_write_byte( BYTE address, BYTE offset, BYTE byteno, BYTE *p_data);
int i2c_read_byte( BYTE address, BYTE offset, BYTE byteno, BYTE *p_data);
int i2c_write_byte_one( BYTE address, BYTE offset, BYTE data);
int i2c_read_byte_one( BYTE address, BYTE offset, BYTE data);


#endif